<?php
declare(strict_types=1);

namespace LowCode\Naive;

use LowCode\Naive;
use LowCode\Support\JsExp;
use LowCode\Traits\Props\HasContent;
use LowCode\Traits\Props\HasContentStyle;
use LowCode\Traits\Props\HasDescription;
use LowCode\Traits\Props\HasDescriptionStyle;
use LowCode\Traits\Props\HasTitle;
use LowCode\Traits\Props\HasTitleExtra;
use LowCode\Traits\Slots\HasSlotAction;
use LowCode\Traits\Slots\HasSlotAvatar;
use LowCode\Traits\Slots\HasSlotDescription;
use LowCode\Traits\Slots\HasSlotFooter;
use LowCode\Traits\Slots\HasSlotHeader;
use LowCode\Traits\Slots\HasSlotHeaderExtra;

/**
 * Thing组件
 * @method static static make(mixed $children = null) Thing组件
 */
class Thing extends Naive
{
    use HasTitle, HasTitleExtra, HasContent, HasDescription, HasContentStyle, HasDescriptionStyle;

    use HasSlotHeader, HasSlotHeaderExtra, HasSlotFooter, HasSlotAvatar, HasSlotDescription, HasSlotAction;

    /**
     * @param mixed|null $children
     */
    public function __construct(mixed $children = null)
    {
        parent::__construct();
        $this->children($children);
    }


    /**
     * 是否启用内容缩进
     * @param bool|JsExp $bool
     * @return $this
     */
    public function contentIndented(bool|JsExp $bool = true): static
    {
        return $this->prop('contentIndented', $bool);
    }
}
